/*
 * @Author: 老刘
 * @Date: 2020-04-29 15:51:38
 * @Description: 特色组件列表
 */
import { go } from '../../../utils/util.js';
Page({
	data: {
		animationList: [
			{title: '自定义导航栏', ico: 'weather', url: 'customize_navigation_bars', status: ''},
			{title: 'Swiper', ico: 'set', url: 'characteristic_components_for_swiper', status: ''},
			{title: '进度条', ico: 'set', url: 'progress_bar', status: ''},
			{title: '加载中', ico: 'set', url: 'characteristic_components_for_loading', status: ''},
			{title: '数字增长', ico: 'set', url: 'count_up', status: ''},
			{title: '弹窗', ico: 'set', url: '/pages/animate_css/popup_window_for_css/popup_window_for_css', status: ''},
			{title: '水平导航', ico: 'set', url: 'horizontal_navigation', status: ''},
			{title: '垂直导航', ico: 'set', url: 'vertical_navigation', status: ''},
			{title: '索引', ico: 'set', url: 'indexes', status: ''},
			{title: '打字机', ico: 'set', url: 'typewriter', status: ''},
			{title: '加入购物车', ico: 'set', url: 'shopping_cart', status: ''},
			{title: '生成海报', ico: 'set', url: '/pages/canvas/posters/posters', status: ''},
			{title: '生成海报(wxml)', ico: 'set', url: '/pages/canvas/posters_for_wxml/posters_for_wxml', status: ''},
			{title: '生成二维码', ico: 'set', url: '/pages/canvas/get_qr_code/get_qr_code', status: ''},
			{title: '拍照', ico: 'set', url: '/pages/canvas/taking_pictures/taking_pictures', status: ''},
			{title: '长按保存二维码', ico: 'set', url: 'save_the_picture', status: ''},
			{title: '下拉选择', ico: 'set', url: 'drop_down_choose', status: ''},
			{title: '自定义数字键盘', ico: 'set', url: 'numeric_keyboard', status: ''},
			{title: '自定义日期选择', ico: 'set', url: 'custom_date', status: ''},
			{title: '时间轴(一)', ico: 'set', url: 'timeline', status: ''},
			{title: '时间轴(二)', ico: 'set', url: 'timeline2', status: ''},
			{title: '可拖拽组件', ico: 'set', url: 'drag', status: ''}
		],
		total: 0
	},
	handleGo (e) {
		const url = e.currentTarget.dataset.url;
		if (url.includes('/canvas/') || url.includes('/animate_css/')) {
			go(url);
			return;
		}
		go(`/pages/characteristic_components/${url}/${url}`);
	}
});
